package com.example.micrdataservice.controller;

import com.example.micrapi.feign.SysUserServiceFeign;
import com.example.micrapi.pojo.User;
import com.example.micrdataservice.mapper.UserMapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * @description: 用户接口
 * @author: uu
 * @date: 2024/3/10 19:09
 */
@Tag(name = "用户接口")
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserMapper userMapper;

    @Operation(summary = "更新用户信息")
    @PutMapping("/updateUserInfo")
    public Boolean updateUserInfo(@RequestBody User user) {

        int count = userMapper.updateByPrimaryKeySelective(user);
        return count == 1;
    }
}
